<template>
  <div>
    <h6>{{newsinfo.title}}</h6>
    <hr>
    <div class="info" v-html="newsinfo.content"></div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      newsinfo: ''
    }
  },
  mounted(){

    console.log(this.$route.params.aid);
    var aid = this.$route.params.aid;
    this.getData(aid);
  },

  methods:{
    getData(aid){

      var api = 'http://www.phonegap100.com/appapi.php?a=getPortalArticle&aid='+aid
      this.$http.get(api).then(Response =>{

        console.log(Response)
        this.newsinfo = Response.body.result[0]

      },(err) =>{
        console.log(err)
      })
    }
  }
}
</script>

<style >
.info{
  padding: 1px;
  line-height: 25px;
  text-indent: 2em;
  font-size: 12px;
}
h6{
  padding-top: 5px;
  text-align: center
}
img{
  max-width: 100%;
}

</style>


